#ifndef _ImrealNew_H
#define _ImrealNew_H

#include "ctrl_basic.h"
#define Dot_White 255
#define Dot_Black 0
typedef struct
{
	u8 x;
	u8 y;
}_xy_St;
extern _xy_St _xy_t;

typedef struct
{
	_xy_St Top_XY;
	_xy_St Bottom_XY;
	_xy_St Left_XY;
	_xy_St Right_XY;
	_xy_St Mid_xy;
	_xy_St Lost_xy;
	s16 Rotate_Off;
	
}Info_Car_St;
extern Info_Car_St Info_Car_t;

typedef struct
{
	YesNo_t En_Yaw;
	YesNo_t	Have_Car_Flag;
	YesNo_t	Have_Top_Car;
	YesNo_t	Have_Bottom_Car;
	YesNo_t	Reach_Edge_Flag;
}Car_Flag_St;
extern Car_Flag_St Car_Flag_t;

void	fine_Offest_Rotate(u8 begin,u8 end);
u8 edge_Track_Line(u8 x,u8 HEIGHT,u8* Line_Begin,u8* Line_End);
u8 scan_One_Line(u8 LINE,u8* X_Begin,u8* X_End);
uint16 Sque_Dif(uint16 x1,uint16 y1,uint16_t x2,uint16_t y2);
void Para_Init(void);
void Seach_Car_XY(void);
#endif

